package com.example.IoCpractice.component;

import com.example.IoCpractice.model.UserInfo;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2025-01-12
 * Time: 16:09
 */
@Component
public class UserComponent {
    /*@Autowired
    @Qualifier("userInfo3")
    private UserInfo ui;*/

    @Resource(name = "userInfo3")
    private UserInfo ui;
    public void say() {
        System.out.println("UserComponent to say!");
        System.out.println(ui);
    }
}
